RunJavaScript<TResult>(String) Method
Runs the specified JavaScript code in the page's context and returns the result.

C# Syntax

TResult RunJavaScript<TResult>( 
   string scriptToRun
)

Parameters

scriptToRun
The JavaScript code to run.

Type Parameters

TResult
The type of return value.

Return Value

The JavaScript code to run.